package com.etong.frame.directive.checker.impl;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Min extends Value {

	public boolean build(String expr) {
		clear();

		setName(expr);

		String regex = "\\@Min\\((.*)\\)";
		Pattern pattern = Pattern.compile(regex);
		Matcher matcher = pattern.matcher(expr);
		if (matcher.matches()) {
			buildAttribute(matcher.group(1));
		}

		comparer = new MinComparer();

		if (null == valuer) {
			return false;
		}

		return true;
	}
}
